package com.sjsu.CMPE226.etl.beans;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
/**
 * 
 * @author Pawar Deepali
 *
 */
@Entity
@Table(name = "mesowest_network_info")
public class Network {
	@Id
	@Column(name = "Network_Id", updatable = false, nullable = false)
	private int networkId;

	@Column(name = "Network_Name", nullable = true)
	private String networkName;

	public Network() {

	}

	public int getNetworkId() {
		return networkId;
	}

	public void setNetworkId(int networkId) {
		this.networkId = networkId;
	}

	public String getNetworkName() {
		return networkName;
	}

	public void setNetworkName(String networkName) {
		this.networkName = networkName;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + networkId;
		result = prime * result
				+ ((networkName == null) ? 0 : networkName.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Network other = (Network) obj;
		if (networkId != other.networkId)
			return false;
		if (networkName == null) {
			if (other.networkName != null)
				return false;
		} else if (!networkName.equals(other.networkName))
			return false;
		return true;
	}

}